/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 spell_sparks.h

	$Header: /heroes4/spell_sparks.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( SPELL_SPARKS_H_INCLUDED )
#define SPELL_SPARKS_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "combat_creature_ptr.h"
#include "combat_spell.h"
#include "handler.h"
#include "map_point.h"

class t_combat_creature_list;
enum  t_direction;

// -----------------------------------------------------------------
// sparks combat spell
// -----------------------------------------------------------------
class t_spell_sparks : public t_combat_spell
{
public:
	t_spell_sparks( t_battlefield& battlefield, t_spell spell );

	virtual bool            begin_casting();
	virtual bool		    cast_on( t_combat_creature_ptr caster, 
		                             t_combat_creature_ptr target, 
									 int power,
									 bool is_mirror );
	virtual void            execute( t_combat_creature& caster );
	virtual void            execute_mirror_spell( t_combat_creature_ptr creature, int power );
	virtual t_combat_ai_action_list generate_combat_ai_action_list(t_combat_ai &owner);
	virtual double					get_cancel_weight( t_combat_creature const& target ) const;
	virtual int				get_value( t_combat_creature* target ) const;
	virtual t_mouse_window* mouse_move( t_screen_point const& point,
									    std::string& help_text );
	virtual bool            left_click( t_screen_point const& point );
protected:
	void begin_attack( t_combat_creature& caster );
	void cast( t_combat_creature_ptr caster, t_direction base_direction, int power,
			   t_combat_creature_list const& targets, bool is_mirror );
	void move_to_attack( t_map_point_2d const& destination );

	t_map_point_2d        m_attack_point;
	t_combat_creature_ptr m_spell_target;
};

#endif // SPELL_SPARKS_H_INCLUDED